package com.xz.knowledgeDuplication.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 结果
 *
 * @author 召
 * @date 2021-12-26 21:28:05
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class R {

    private String code;

    private String msg;

    private Object data;

    public R(ResponseEnum responseEnum) {
        this.code = responseEnum.getCode();
        this.msg = responseEnum.getMsg();
    }

    public R(ResponseEnum responseEnum, Object data) {
        this.code = responseEnum.getCode();
        this.msg = responseEnum.getMsg();
        this.data = data;
    }
}
